Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the repo/remote handling #1808

Merged
merged 3 commits into from
Jul 18, 2022
Merged

Refactor the repo/remote handling #1808

merged 3 commits into from
Jul 18, 2022

Conversation

mortenpi
Copy link
Member

This factors out the refactoring part of #1254 to make the whole thing a little more manageable. In short, it introduces the Remotes module which allows for a more flexible way to define the remote repository. The Remote objects can be passed via the repo keyword to makedocs:

makedocs(repo = Remotes.GitHub("JuliaDocs", "Documenter.jl"), ...)

The user can also define a custom Remotes.Remote type and overload the Remotes.repourl and Remotes.fileurl functions to control the link generation.

We do quite a bit of special handling of GitLab, BitBucket and Azure Devops repositories, so it would probably be worth adding special Remotes.Remote types for each of those too.

@mortenpi
Copy link
Member Author

I think this in a mergeable shape now. I reduced it down to the bare minimum to introduce the Remotes module, without changing any behavior as far as I can tell (except one case, where I replaced one buggy behavior with another).

I do have a bunch of follow-up ideas, to properly fix up getremote etc., which will likely change some behaviors and also refactor parts of the code. And then there is the UI change in #1254. But to make it manageable to review and to make sure I am not accidentally changing or breaking anything I did not intend, I want to merge this minimal version first and do those things in follow-up PR(s).

@fredrikekre Would you have time to look through this? It's a little big, but I would love to get another set of eyes on this.

@mortenpi
Copy link
Member Author

Thanks @fredrikekre!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants